package top.hmtools.feign.controller;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import top.hmtools.feign.domain.UserBean;
import top.hmtools.feign.interfaceFeign.SchedualServiceHi;

@RestController
public class HiController {
	
	private final Logger logger = LoggerFactory.getLogger(HiController.class);

    @Autowired
    SchedualServiceHi schedualServiceHi;
    
    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public String sayHi(@RequestParam(required=false) String name){
    	this.logger.info("top.hmtools.feign.controller.HiController.sayHi(String) 接受到请求>>>>");
    	
    	Object re = this.schedualServiceHi.re();
    	
    	UserBean re2 = this.schedualServiceHi.re2();
    	
    	Object res = this.schedualServiceHi.res();
    	
    	List<UserBean> res2 = this.schedualServiceHi.res2();
    	
    	Object mav = this.schedualServiceHi.mav();
        return schedualServiceHi.sayHiFromClientOne(name)+" and feign say hi";
    }
}
